﻿@using SCMS.Resources
@{
    ViewBag.Title = Resources_frank.ExchangeRate_Index_Title;
    Layout = "~/Views/Shared/_GeneralLayout.cshtml";
}
<div id="DesignationMain" class="contentMain">
    <div class="contentHeader">
        <div class="headerText">
            <h3 class="title-left">
                @Resources_frank.ExchangeRate_Index_Header</h3><br />
        </div>
        <div style="font-size: 13px;">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td class="arrowLink">
                        @Ajax.ActionLink(Resources_frank.Global_String_AddNew, "Index", new AjaxOptions
                        {
                            UpdateTargetId = "popup-page",
                            LoadingElementId = "popup-loading",
                            Url = Url.Action("CreateEdit"),
                            OnBegin = string.Format("ShowDialogue('{0}')", Resources_frank.ExchangeRate_Index_NewExchangeRate),
                            OnSuccess = "CenterPopup"
                        })
                    </td>
                    <td class="arrowLink">
                        @Html.ActionLink(Resources_frank.Global_String_BackToGlobalSettings, "Index", "GlobalSettings")
                    </td>
                  </tr>
                  <tr>
                    <td class="arrowLink">
                        @Ajax.ActionLink(Resources_frank.ExchangeRate_Index_ViewExchangeRates, "Index", new AjaxOptions
                           {
                               UpdateTargetId = "ContentDiv",
                               LoadingElementId = "loading",
                               Url = Url.Action("ListView"),
                               OnSuccess = "if (document.getElementById('table') != null) {initSorter();sorter.size(20);}"
                           })
                    </td>   
                </tr>
            </table>
        </div>
    </div>
    <br />
    <div id="loading" style="display: none; color: Blue; font-weight: bold;">
        <img src="../../Content/images/loading_indicator.gif" alt="@Resources_frank.Global_String_Processing" />
    </div>
    <div id="ContentDiv">
        <!-- Content goes here-->
        @Html.Action("ListView")
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        if (document.getElementById('table') != null) {
            initSorter();
            sorter.size(20);
        }
    });
</script>